/*
This file is part of lAPIn.

lAPIn is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

lAPIn is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with lAPIn.  If not, see <http://www.gnu.org/licenses/>.
*/
package org.opensource.nabaztag;

import java.awt.Color;
import java.net.URL;

/**
 *API usage sample.
 */
public class App {

    public static void main(final String[] args) throws Exception {
        final Rabbit rabbit = new Rabbit(args[0], args[1]);
       
        rabbit.say("hello").go();
        rabbit.say("julien").go();

        rabbit.sendMessage(10333).go();

        rabbit.withLeftEar(4).withRightEar(16).say("moving").go();

        rabbit.stream(new URL("http://mp3.juno.co.uk/MP3/SF162327-01-01-04.mp3"),
                new URL("http://213.205.96.91:9915"));

        rabbit.sendChoregraphy("choregraphy", new Choregraphy(10, new Choregraphy.Command(0, Rabbit.LED.MIDDLE, Color.GREEN),
                new Choregraphy.Command(20, Rabbit.LED.LEFT, Color.BLUE), new Choregraphy.Command(20, Rabbit.LED.RIGHT, Color.BLUE),
                new Choregraphy.Command(30, Rabbit.EAR.LEFT, 90, Rabbit.EAR.ROTATION.CLOCKWISE),
                new Choregraphy.Command(30, Rabbit.EAR.RIGHT, 90, Rabbit.EAR.ROTATION.COUNTER_CLOCKWISE))).go();
    }

}
